import java.util.ArrayList;

public class students59 {
    public static void main(String[] args) {
        ArrayList<students> list =new ArrayList<students>();
        students s1 = new students("张三",25);
        students s2 = new students("李四",23);
        students s3 = new students("王五",24);
        list.add(s1);
        list.add(s2);
        list.add(s3);
        for(int i=0; i<list.size(); i++){
            students stu = list.get(i);
            System.out.println(stu.getName()+","+stu.getAge());
        }

    }
}
